<?php
composer 安装
=================================================
一：简介
    网址：http://www.phpcomposer.com/
    中国镜像：http://pkg.phpcomposer.com/

二：安装
    php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
    php composer-setup.php
    php -r "unlink('composer-setup.php');"



局部安装
全局安装


 grant all privileges on *.* to 'tdrhtest'@'localhost' identified by 'tdrhEDU123' with grant option;
 grant all privileges on *.* to 'tdrhtest'@'127.0.0.1' identified by 'tdrhEDU123' with grant option;
 flush privileges;

 grant all privileges on *.* to 'tdrhtest'@'%' identified by 'tdrhEDU123' with grant option;

 flush privileges;


mysql -u tdrhtest -h127.0.0.1 -ptdrhEDU123






DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=gxydserver
DB_USERNAME=tdrhtest
DB_PASSWORD=tdrhEDU123




















 tdrhtest tdrhEDU123


 grant all privileges on *.* to 'localhost'@'%' identified by 'tdrhEDU123' with grant option;
 flush privileges;

 mysql -utdrhtest -hlocalhost -ptdrhEDU123
 mysql -utdrhtest -h127.0.0.1 -ptdrhEDU123

mysqladmin -u root password 123456
 mysql -uroot -hlocalhost -p123456
 mysql -uroot -h127.0.0.1 -p123456



创建数据表
php artisan migrate:make  --create=news


 migrate
  migrate:install     Create the migration repository
  migrate:refresh     Reset and re-run all migrations
  migrate:reset       Rollback all database migrations
  migrate:rollback    Rollback the last database migration
  migrate:status      Show the status of each migration


php artisan migrate:install  --create=news
php artisan migrate:install news
php artisan make:migration create_news_table --create=news











$table->bigIncrements('id');    Incrementing ID (primary key) using a "UNSIGNED BIG INTEGER" equivalent.
$table->bigInteger('votes');    BIGINT equivalent for the database.
$table->binary('data'); BLOB equivalent for the database.
$table->boolean('confirmed');   BOOLEAN equivalent for the database.
$table->char('name', 4);    CHAR equivalent with a length.
$table->date('created_at'); DATE equivalent for the database.
$table->dateTime('created_at'); DATETIME equivalent for the database.
$table->decimal('amount', 5, 2);    DECIMAL equivalent with a precision and scale.
$table->double('column', 15, 8);    DOUBLE equivalent with precision, 15 digits in total and 8 after the decimal point.
$table->enum('choices', ['foo', 'bar']);    ENUM equivalent for the database.
$table->float('amount');    FLOAT equivalent for the database.
$table->increments('id');   Incrementing ID (primary key) using a "UNSIGNED INTEGER" equivalent.
$table->integer('votes');   INTEGER equivalent for the database.
$table->json('options');    JSON equivalent for the database.
$table->jsonb('options');   JSONB equivalent for the database.
$table->longText('description');    LONGTEXT equivalent for the database.
$table->mediumInteger('numbers');   MEDIUMINT equivalent for the database.
$table->mediumText('description');  MEDIUMTEXT equivalent for the database.
$table->morphs('taggable'); Adds INTEGER taggable_id and STRING taggable_type.
$table->nullableTimestamps();   Same as timestamps(), except allows NULLs.
$table->rememberToken();    Adds remember_token as VARCHAR(100) NULL.
$table->smallInteger('votes');  SMALLINT equivalent for the database.
$table->softDeletes();  Adds deleted_at column for soft deletes.
$table->string('email');    VARCHAR equivalent column.
$table->string('name', 100);    VARCHAR equivalent with a length.
$table->text('description');    TEXT equivalent for the database.
$table->time('sunrise');    TIME equivalent for the database.
$table->tinyInteger('numbers'); TINYINT equivalent for the database.
$table->timestamp('added_on');  TIMESTAMP equivalent for the database.
$table->timestamps();   Adds created_at and updated_at columns.
$table->uuid('id'); UUID equivalent for the database.